package com.example.controller;


import com.example.pojo.Result;
import com.example.service.EchartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin
@RestController
@RequestMapping("/echarts")
public class EchartsController {
    @Autowired
    private EchartsService echartsService;

    @RequestMapping("/getBarData")
    public Result getBarData(){
        return echartsService.getBarData();
    }
    @RequestMapping("/getPieData")
    public Result getPieData(){
        return echartsService.getPieData();
    }

}
